The present invention relates generally to an improved tool for debugging software applications. In particular, the present invention relates to a client-side debugging tool for use in debugging dynamic hypertext mark-up language (DHTML) software programs.
The World Wide Web (xe2x80x9cWebxe2x80x9d) is essentially a distributed depository of interconnected files stored on Web servers, i.e., computers. These computers, and others, are connected by a global communications network, the Internet.
Web browser software (xe2x80x9cbrowserxe2x80x9d) running on a user""s computer, i.e., a Web client, is used to access, retrieve, interpret, and display files accessible via the Internet. In the Web context, most of these files are text files written in hypertext mark-up language (HTML) code, which marks up text with special commands that control its formatting and link it with other files in a manner which can be interpreted by a browser. The coding, including HTML commands (xe2x80x9celementsxe2x80x9d or xe2x80x9ctagsxe2x80x9d), is typically hidden from the user. The user views a Web page which is the browser""s interpretation of the coding, including text, colors, graphics, sounds, etc. The coding is contained in a xe2x80x9csource filexe2x80x9d, which is sent from a server. The HTML coding contained in the source file is referred to as xe2x80x9chard-codedxe2x80x9d or xe2x80x9cstaticxe2x80x9d HTML.
HTML coding generated dynamically, i.e., at a client after the file leaves a server, is referred to as dynamic HTML (xe2x80x9cDHTMLxe2x80x9d). DHTML also refers to the practice of dynamic generation of code and encompasses a combination of HTML tags, options, and programming that allows for more animated and/or more interactive Web pages. DHTML combines standards including HTML, style sheets, a scripting language, and the xe2x80x9cDocument Object Modelxe2x80x9d or xe2x80x9cDOMxe2x80x9d standard established by the World Wide Web Consortium or W3C and available for review at the time of filing of the application on the World Wide Web at http://www.w3c.org/dom. The Document Object Model is essentially a roadmap for a hierarchy in which variables are stored in accordance with the Document Object Model. DHTML is currently supported by recent versions of browser software, such as Netscape Communications Corp.""s Navigator(copyright) 4.0 or higher or Microsoft Corporation""s Internet Explorer(copyright) 4.0 or higher. Each of the web browsers has implemented the Document Object Model to varying degrees.
A DHTML source file includes static (xe2x80x9chard-codedxe2x80x9d) HTML as well as a hard-coded script for generating DHTML at the client. Scripts may be written in any suitable language, e.g., Microsoft Corporation""s visual basic script (xe2x80x9cVBScriptxe2x80x9d) and xe2x80x9cJScriptxe2x80x9d, Netscape Corporation""s Javascript, or Perl Script. For example, a script could be used to dynamically generate coding for displaying a table on a Web page. The use of scripts for creating dynamically created HTML code (or xe2x80x9cdynamic codexe2x80x9d) at the Web client is well known in the art. The dynamic code generated by DHTML is stored in internal variables of the web browser. The browser""s interpretation of the dynamic code is displayed to the user as a web page.
Until now, a user could display, at the client, only the static HTML coding in the source file as it was received at the client from the server, e.g., using a xe2x80x9cView Sourcexe2x80x9d or web browser command. Accordingly, the xe2x80x9cView Sourcexe2x80x9d command has been used as a debugging tool for static HTML. Before the use of client-side code generation (DHTML), the viewing of static coding was sufficient for debugging purposes.
The use of DHTML to dynamically generate code at the client is becoming much more frequent. Problems, errors, or xe2x80x9cbugsxe2x80x9d in a script may create errors in the dynamic code. The results of erroneous DHTML code are easy for the user to find, e.g., by viewing an incomplete table using a web browser. Until now, the only mode of debugging DHTML software was to view the static script using the xe2x80x9cView Sourcexe2x80x9d browser command. However, errors in a script are typically difficult to find because of the complexity of scripting languages. Additionally, the syntax of the scripting language may be correct although the script will generate erroneous dynamic code.
FIG. 1 is an image of an exemplary DHTML Web page 10 shown displayed in a Web browser window 12, as it would be seen on a user""s computer and as is known in the prior art. FIG. 1 shows a malformed table 14 resulting from dynamic code generated by a script in a source file (not shown). In this example, the table should have 1 column, 5 rows, and a number between 1 and 5 should appear in each of the cells of the table. However, the script contains an error that generates dynamic code that does not produce the desired table. The result is the single-celled table 14 that appears in FIG. 1. It is readily apparent to a user that the script is faulty since the desired five-celled table is not displayed. Accordingly, the programmer would want to xe2x80x9cdebugxe2x80x9d, the Web page.
FIG. 2 is an image of a portion of the DHTML source file for displaying the exemplary Web page of FIG. 1. The source code 20, includes static HTML and a script (identified by the designation xe2x80x9cAllxe2x80x9d) for generating dynamic code. The source code may be displayed in a source window 22 using the xe2x80x9cView Sourcexe2x80x9d command and, as is evident, the dynamic code generated by the script A is not displayed. The erroneous script shown at xe2x80x9cAxe2x80x9d in FIG. 2 is written in the javascript programming language.
FIG. 2 is a display of the source file as it is received from a Web server. It is difficult by examining only the script A to determine the error that generates the erroneous dynamic code resulting in the malformed table shown in FIG. 1. Because of the syntax of HTML, it would be easy to find errors in dynamically created code generated by a script if this code was viewable. Until now, the user could not view the dynamic code. Now that DHTML is widely used, it is desirable for the user to view the dynamic code for debugging purposes.
The present invention provides a client-side software debugging tool for viewing dynamic code. Accordingly, the present invention provides a tool for assisting a programmer in locating errors in DHTML and scripts for generating dynamic code. Whereas current debugging tools, such as the xe2x80x9cView Sourcexe2x80x9d command of popular Web browser software, permit a programmer to view only static code as it is received from a Web server, e.g., a script, the present invention permits the programmer to view the dynamic code generated at the client by the script. This assists the programmer to locate errors in, or xe2x80x9cdebugxe2x80x9d, software by viewing the results of a script, rather than the script itself. Advantageously, the present invention may be used in conjunction with existing browser software by providing a viewer for viewing the browser""s internal variables that are currently used to store dynamic code.